// pages/home/index.ts
import { baseBehavior } from "./behaviors"

Page({
  behaviors: [baseBehavior],
  data: {
    active: 0,
    activeTabbar: 1,
    isTriggered: false,
    swipperList:[{
      url:"https://ufm-pic.ur.com.cn/image/tmp/1699261737609.jpg"
    },{
      url:"https://ufm-pic.ur.com.cn/image/tmp/17104877690891710487769064.jpg"
    },{
      url:"https://ufm-pic.ur.com.cn/image/tmp/17104877690891710487769064.jpg"
    },{
      url:"https://ufm-pic.ur.com.cn/image/tmp/17104877690891710487769064.jpg"
    },{
      url:"https://ufm-pic.ur.com.cn/image/tmp/17104877690891710487769064.jpg"
    }],
    itemsCustom: [
      {
        title: '标题文字',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*MwsuTZI4qA8AAAAAAAAAAAAAARQnAQ'
      },
      {
        title: '标题文字',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*xXRcRohQFc0AAAAAAAAAAAAAARQnAQ'
      },
      {
        title: '标题文字',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*UJf2QLxdoa8AAAAAAAAAAAAAARQnAQ'
      },
      {
        title: '标题文字',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*now3Q4h5DH8AAAAAAAAAAAAAARQnAQ'
      },
      {
        title: '标题文字',
        icon: 'https://gw.alipayobjects.com/mdn/rms_3a7189/afts/img/A*I27zQbOu8ScAAAAAAAAAAAAAARQnAQ'
      }
    ]
  },
  onClickLeft() {
    wx.showToast({ title: '点击返回', icon: 'none' });
  },
  onClickRight() {
    wx.showToast({ title: '点击按钮', icon: 'none' });
  },

  onChange(event: any) {
    wx.showToast({
      title: `切换到标签 ${event.detail.name}`,
      icon: 'none',
    });
  },

  onChangeTabbar(event: any) {
    this.setData({ activeTabbar: event.detail });
  },

  onGoPage(){
    wx.navigateTo({
      url:'/pages/user/index'
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad() {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  },


  // 分享朋友圈
  onShareTimeline() {

  },


  changeBindrefresherrefresh() {
    setTimeout(() => {
      this.setData({
        isTriggered: false
      })
    }, 1000)
  }
})